import { request } from '@/utils/request';

export const listSchool = () => {
  return request({
    url: '/app/org/school/list',
    method: 'get',
  });
};

export const listGrade = () => {
  return request({
    url: '/app/org/grades/list',
    method: 'get',
  });
};

export const listClass = (schoolId, gradeId) => {
  return request({
    url: '/app/org/classes/list',
    method: 'get',
    query: {
      schoolId,
      gradeId
    }
  });
};



export const delStudentInfo = (id) => {
  return request({
    url: '/app/org/students/' + id,
    method: 'delete',
  });
};

export const getStudentInfo = (id) => {
  return request({
    url: '/app/org/students/' + id,
    method: 'get',
  });
};

export const saveStudentInfo = (data) => {
  return request({
    url: '/app/org/students/save',
    method: 'post',
    data,
  });
};

export const listStudentInfo = (userId) => {
  return request({
    url: '/app/org/students/list',
    method: 'get',
    query: {
      userId,
    }
  });
}
